NEWQ scribbling in filters.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Aug 2013 17:40:20 +0000 (17:40 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 15 Aug 2013 17:40:20 +0000 (17:40 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4534 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/arcdist.cc
gpsbabel/polygon.cc
gpsbabel/radius.cc

index 8456a91bb6cd8599988dc28d1f0787021a13ad14..12a93393b8c408f84dae44cb9b853f2d5fc82535 100644 (file)
@@ -92,9 +92,12 @@ arcdist_arc_disp_wpt_cb(const waypoint *arcpt2)
   if (arcpt2 && arcpt2->latitude != BADVAL && arcpt2->longitude != BADVAL &&
       (ptsopt || (arcpt1 &&
                   (arcpt1->latitude != BADVAL && arcpt1->longitude != BADVAL)))) {
+#if NEWQ
+    foreach(waypoint* waypointp, waypt_list) {
+#else
     QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
-
       waypointp = (waypoint*) elem;
+#endif
       if (waypointp->extra_data) {
         ed = (extra_data*) waypointp->extra_data;
       } else {
@@ -204,8 +207,12 @@ arcdist_process(void)
   }
 
   removed = 0;
+#if NEWQ
+  foreach(waypoint* wp, waypt_list) {
+#else
   QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
     waypoint* wp = (waypoint*) elem;
+#endif
     extra_data* ed;
     ed = (extra_data*) wp->extra_data;
     wp->extra_data = NULL;
index 7ec0acbdeed897b2d5a59998027eab391967f4e5..700f2257c1a65d6068bba6220328a6c3fae90279 100644 (file)
@@ -269,9 +269,12 @@ polygon_process(void)
               fileline);
     } else if (lat1 != BADVAL && lon1 != BADVAL &&
                lat2 != BADVAL && lon2 != BADVAL) {
+#if NEWQ
+      foreach(waypoint* waypointp, waypt_list) {
+#else
       QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
-
         waypointp = (waypoint *)elem;
+#endif
         if (waypointp->extra_data) {
           ed = (extra_data *) waypointp->extra_data;
         } else {
@@ -315,8 +318,12 @@ polygon_process(void)
   }
   gbfclose(file_in);
 
+#if NEWQ
+  foreach(waypoint* wp, waypt_list) {
+#else
   QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
     waypoint *wp = (waypoint *) elem;
+#endif
     ed = (extra_data *) wp->extra_data;
     wp->extra_data = NULL;
     if (ed) {
index dde26d064300ea523e0e8e8ff20a6db5ee845dc1..941edc92d544a89f4722ffaa634b80d7445af32e 100644 (file)
@@ -116,11 +116,12 @@ radius_process(void)
   int i, wc;
   queue temp_head;
   route_head *rte_head = NULL;
-
+#if NEWQ
+  foreach(waypoint* waypointp, waypt_list) {
+#else
   QUEUE_FOR_EACH(&waypt_head, elem, tmp) {
-    extra_data *ed;
-
     waypointp = (waypoint *)elem;
+#endif
     dist = gc_distance(waypointp->latitude,
                        waypointp->longitude,
                        home_pos->latitude,
@@ -135,7 +136,7 @@ radius_process(void)
       continue;
     }
 
-    ed = (extra_data *) xcalloc(1, sizeof(*ed));
+    extra_data *ed = (extra_data *) xcalloc(1, sizeof(*ed));
     ed->distance = dist;
     waypointp->extra_data = ed;
   }